package com.michael.study.component.service

import android.app.Service
import android.content.Intent
import android.os.IBinder
import android.util.Log

/**
 * 重复 startService 第二次只会调用 onStartCommand
 */
class MyService : Service() {

    companion object {
        val TAG = "lgq service"
    }


    override fun onCreate() {
        super.onCreate()
        Log.d(TAG, "onCreate: ")
    }

    override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
        Log.d(TAG, "onStartCommand: ")
        return super.onStartCommand(intent, flags, startId)
    }

    override fun onBind(intent: Intent): IBinder {
        Log.d(TAG, "onBind: ")
        TODO("Return the communication channel to the service.")
    }
}
